import Vue from 'vue';
import Router from 'vue-router';
import goods from '../components/goods/goods.vue';
import ratings from '../components/ratings/ratings.vue';
import seller from '../components/seller/seller.vue';

Vue.use(Router);

// const goods = resolve => require(['../components/goods/goods.vue']);
// const ratings = resolve => require(['../components/ratings/ratings.vue']);
// const seller = resolve => require(['../components/seller/seller.vue']);

export default new Router({
  mode: 'hash',
  linkActiveClass: 'activeRouter',
  routes: [
    {
      path: '/goods',
      component: goods
    },
    {
      path: '/ratings',
      component: ratings
    },
    {
      path: '/seller',
      component: seller
    }
  ]
});

// const router = new Router({
//   routes: [{
//     path: '/goods',
//     component: require('../components/goods/goods.vue')
//   },
//     {
//       path: '/ratings',
//       component: require('../components/ratings/ratings.vue')
//     },
//     {
//       path: '/seller',
//       component: require('../components/seller/seller.vue')
//     }
//   ]
// });
// export default router;
